/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package io.renren.controller;

import com.google.common.collect.Maps;
import io.renren.common.utils.Result;
import io.renren.core.dto.LearnCompetitionInfoDTO;
import io.renren.core.dto.LearnKnowSourceDTO;
import io.renren.core.dto.LearnKnowTypeDTO;
import io.renren.core.entity.LearnCompetitionInfoEntity;
import io.renren.core.service.LearnCompetitionInfoService;
import io.renren.core.service.LearnKnowSourceService;
import io.renren.core.service.LearnKnowTypeService;
import io.renren.core.service.LearnNewsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;

/**
 * competition
 */
@RestController
@RequestMapping("/api/competition")
@Api(tags = "竞赛信息")
public class ApiCompetitionController {

    @Autowired
    private LearnCompetitionInfoService learnCompetitionInfoService;

    @GetMapping("list")
    @ApiOperation(value = "列表")
    public Result<?> list() {
        List<LearnCompetitionInfoDTO> sourceList = learnCompetitionInfoService.list(Maps.newHashMap());
        return new Result<>().ok(sourceList);
    }
}